import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;




public class FileUtil {
    public static void main(String[] args) throws IOException {
        String []arr={"Hadoop","HDFS","MapReduce","Flume","Spark","Flink","Hive","HBase"};
        File file=new File("D:\\下载\\wc.txt");
        FileWriter fw=new FileWriter(file);
        BufferedWriter bw=new BufferedWriter(fw);
        while(file.length()<1024*1014*10){
            int num=random(1,10);
            for(int i=0;i<num;i++){
                bw.write(arr[random(0,arr.length)]);
                bw.write(" ");
            }
            bw.newLine();

        }
        bw.flush();
        bw.close();
        fw.close();
    }
    public static int random(int min,int max){
        return (int)(Math.random()*(max-min)+min);
    }
}
